<?php

class InfoMethod extends RestMethod {
	function runInternal() {
		$c = Yii::app();
		$obj = Ad::model()->findByAttributes(array(
			'type' => Ad::TYPE_M_TOP,
		));
		
		$loginUrl = $c->createUrl('/provide/index/login');
		$logoutUrl = $c->createUrl('/provide/index/logout');
		
		return array(
			'logo' => array(
				'thumb' => Yii::app()->baseUrl.'/images/ly_logo.png',
				'link' => Yii::app()->baseUrl,
				'target' => '_self',
				'title' => '',
			),
			'banner' => array(
				'thumb' => $obj->getAccessUrl('thumb'),
				'link' => $obj->link,
				'target' => $obj->target,
				'title' => $obj->title,
			),
			'loginUrl' => $loginUrl,
			'logoutUrl' => $logoutUrl,
		);
	}


}

?>